What are 3D shapes?
If you’ve been programming here on Khan Academy, you’ve probably drawn a whole lot of 2D shapes, like with rectangles and ellipses, and maybe you’ve wondered to yourself how to make 3D shapes, like cubes and spheres.
Well, the ProcessingJS library that we use here isn’t really designed for 3D graphics, but as it turns out, with some trigonometry, we can write our own 3D graphics engine and, in doing so, learn a bit how 3D graphics work (and why there is a reason to learn trigonometry besides making math teachers happy!).